<?php
class PapiWS_Model_TaxonomyVO
{
	public $tid;
	public $name;
	public $weight;
	public $depth;
	public $img;
	public $children;
	
	public function __construct( $data )
	{
		if( !isset ( $data['tid'] ) ) {
			$data = $data['children'][0];
		}		
		$this->tid = $data['tid'];
		$this->name = $data['name'];
		$this->weight = $data['weight'];
		$this->depth = $data['depth'];
		$this->img = $data['img'];
		$this->children = ( isset( $data['children'] )? count( $data['children'] ):0);
	}
}
